package com.example.firstjavamqtt.service.log;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.firstjavamqtt.model.device.TemperatureHumidityMonitor;
import com.example.firstjavamqtt.model.dto.log.TemperatureHumidityLogDto;
import com.example.firstjavamqtt.model.dto.mqtt.MqttTemperatureHumidityDto;
import com.example.firstjavamqtt.model.log.TemperatureHumidityMonitorLog;

import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;

public interface TemperatureHumidityLogService extends IService<TemperatureHumidityMonitorLog> {

    //存储
    void saveTemperatureHumidityLog(MqttTemperatureHumidityDto dto, HttpServletRequest request);
    //根据id删除
    void deleteTemperatureHumidityLogById(int id);
    //根据deviceId删除
    void deleteTemperatureHumidityLogByDeviceId(String deviceId);
    //根据Dto获取
    Page<TemperatureHumidityMonitorLog> getLogByDto(TemperatureHumidityLogDto dto, int pageNum, int limit);
    //批量id删除
    void deleteLedLogByBatchId(ArrayList<Integer> batchId);
    //根据设备id获取
    Page<TemperatureHumidityMonitorLog> getByDeviceId(int pageNum, int limit, String deviceId,HttpServletRequest request);
    //获取温度
    Page<TemperatureHumidityMonitorLog> getLog(int pageNum, int limit);
}
